<template>
	<div>
		<div style="text-align: left;margin: 1vh; color: black;">
			<div>
				<div>
					<h3>
						<strong>
							{{orderName}}
						</strong>
					</h3>
					<div>{{context}}</div>
					<div style="right: 0;bottom: 0;">x
						<strong>
							{{num}}
						</strong>
	
					</div>
				</div>
			</div>
			<div>
				<span>
					<strong>
						订单编号：
					</strong>{{oid}}</span> <br />
				<span>
					<strong>
						下单时间：
					</strong>{{pubTime}}</span>
			</div>
			<div style="text-align: right; font-size: 2vh;">
				<span>价格：<strong style="color: red;font-size: 1.5rem;">&yen;{{priceShow}}</strong></span> <br />
				<span>状态：
					<strong>
						{{statuName[statu]}}
					</strong>
				</span>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		props: {
			orderName: String,
			context: String,
			num: String,
			oid: String,
			pubTime: String,
			price: String,
			statu: Number
		},
		components:{
			
		},
		data() {
			return {
				statuName: [
					"默认",
					"未支付",
					"已支付",
					"已接单",
					"已结束",
				],
				priceShow: false,
			}
		},
		mounted() {
			// 价格加上小数点
			let str = this.price;
			let numberPrice = Number.parseInt(str);
			if (numberPrice < 10) {
				str = '00' + str;
			} else {
				if (numberPrice < 100) {
					str = '0' + str;
				}
			}
			let arr = str.split('');
			arr.splice(-2, 0, '.');
			str = arr.join('');
			this.priceShow = str;
		},
	};
</script>

<style>
</style>